home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / util / rexx / FWCalendar.lha / FWCalendar / Beep.lha / Beep.doc < prev   
Text File  |  1996-02-24  |  3KB  |  73 lines

  1.  
  2. *****************************************************************************
  3. * Project Details                                                           *
  4. * ---------------                                                           *
  5. * Project Name:    Beep                                                     *
  6. * Project Version: 1                                                        *
  7. * Copyright:       Anthony N Peck                                           *
  8. * Date:            Thursday 1st June 1995                                   *
  9. *                                                                           *
  10. * Contact:                                                                  *
  11. * 68 Woralul St                                                             *
  12. * Waramanga ACT 2611                                                        *
  13. * AUSTRALIA                                                                 *
  14. *                                                                           *
  15. * E-Mail: Anthony.Peck@Radford.act.edu.au                                   *
  16. *                                                                           *
  17. *****************************************************************************
  18. * Summary                                                                   *
  19. * -------                                                                   *
  20. *                                                                           *
  21. * Usage: Beep                                                               *
  22. *                                                                           *
  23. * This is a nonsensical little program that "beeps" and flashes the screen. *
  24. * Feel free to put it at the bottom of your cupboard and forget about it!   *
  25. *                                                                           *
  26. *****************************************************************************
  27.  
  28. ; Some quick equivalents...
  29.  
  30. ExecBase                = $04       ; Exec Base...ahem
  31. _LVOOpenlibrary         = -$0228    ; Exec function opens libraries
  32. _LVOCloselibrary        = -$019E    ; Exec function closes libraries
  33. _LVODisplayBeep         = -$60      ; Intuition function
  34.  
  35. ; An Exec Macro...
  36.  
  37. EXEC            Macro
  38.         MOVE.L  ExecBase,A6         ; Move Exec into a6
  39.         JSR     _LVO\1(A6)          ; Add Library offset and call function
  40.                 Endm
  41.  
  42. ; Program starts here
  43.  
  44. Openint:
  45.  
  46.         LEA     Intname,A1          ; Load the Intuition library
  47.         MOVE.L  #$00,D0             ; Any version will do
  48.         EXEC    Openlibrary         ; Macro opens library
  49.         BEQ     Exit                ; If there's a problem, close down
  50.         MOVE.L  D0,A6               ; Save the return address in A6
  51.  
  52. Beep:
  53.  
  54.         MOVE.L  #$00,A0             ; All screens to "Beep"
  55.         JSR     _LVODisplayBeep(A6) ; Go do it!
  56.  
  57. Close:        
  58.  
  59.         MOVE.L  A6,A1
  60.         EXEC    Closelibrary       ; Macro closes Intuition
  61.  
  62. Exit:
  63.  
  64.         CLR.L   D0                  ; Clear D0
  65.         RTS                         ; Return To System
  66.  
  67. Intname:
  68.  
  69.         DC.B    "intuition.library",$00  ; Intuition library name
  70.  
  71.         END
  72.  
  73.